<<{extend name="cigoadmin@public:editor"/}>>

<<{block name="tool-bar-btns"}>>
<a class="btn btn-warning" href="#" onclick="history.go(-1);">
    <i class="fa fa-reply"></i>
    取消修改
</a>
<a class="btn btn-success" formId="form" href="<<{:url('')}>>">
    <i class="fa fa-check"></i>
    保存修改
</a>
<<{/block}>>

<<{block name="content"}>>
<form id="form">
    <div class="form-group">
        <div class="cigo-edit item-input" cigo-edit-label="旧密码" cigo-edit-type="password"
             cigo-edit-class="form-control" cigo-edit-style="width:260px;"
             cigo-edit-name="oldPwd" cigo-edit-placeholder="请输入原密码..."></div>
    </div>

    <div class="form-group">
        <div class="cigo-edit item-input" cigo-edit-label="新密码" cigo-edit-type="password"
             cigo-edit-class="form-control" cigo-edit-style="width:260px;"
             cigo-edit-name="newPwd" cigo-edit-placeholder="请输入新密码..."></div>
    </div>

    <div class="form-group">
        <div class="cigo-edit item-input" cigo-edit-label="确认密码" cigo-edit-type="password"
             cigo-edit-class="form-control" cigo-edit-style="width:260px;"
             cigo-edit-name="repeatPwd" cigo-edit-placeholder="请确认新密码..."></div>
    </div>
    <div class="form-group btn-group">
        <a class="btn btn-success btn-default" href="<<{:url('')}>>" formId="form">
            保存修改
        </a>
        <a class="btn btn-warning btn-default" href="#" onclick="history.go(-1);">取&nbsp;&nbsp;消</a>
    </div>
</form>
<<{/block}>>

<<{block name="js-footer"}>>
<script type="text/javascript">
    $(".btn-success").click(function (evt) {
        formPost(evt, $(this), function (data) {
            cigoLayer.msg(data.msg, {icon: 6});
            setTimeout(function () {
                if (data.url) {
                    parent.location.href = data.url;
                } else {
                    location.reload();
                }
            }, 1500);
        }, function (data) {
            cigoLayer.msg(data.msg, {icon: 5});
        });

        return false;
    });
</script>
<<{/block}>>
